package com.xyzwps.lib.express.router.annotation.rest;

import com.xyzwps.lib.express.router.annotation.openapi.IntegerSchema;
import com.xyzwps.lib.express.router.annotation.openapi.StringSchema;
import com.xyzwps.lib.openapi.element.In;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.PARAMETER)
public @interface RequestParam {
    String name();

    In in() default In.QUERY;

    String description() default "";

    boolean required() default true;

    boolean deprecated() default false;

    StringSchema asString() default @StringSchema(ignored = true);

    IntegerSchema asInteger() default @IntegerSchema(ignored = true);
}
